package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 知识库-标签状态变更记录 MB_ERP_EQUIPMENT_TAG_RECORD
 *
 * @author Cheng
 * @date 2023-12-23
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_TAG_RECORD")
@Schema(description="知识库-标签状态变更记录")
public class EquipmentTagRecord extends BaseEntity {

private static final long serialVersionUID=1L;


    @Id
    @Generator(policy = UUIDPolicy.class)
    @Column(name = "ID_")
    @Schema(description = "主键")
    private String id;

    @Column(name = "TAG_ID_", length = 64)
    @Schema(description = "标签id")
    private String tagId;

    @Column(name = "TAG_CODE_", length = 64)
    @Schema(description = "标签编码")
    private String tagCode;

    /**
     * 使用状态：字典值：使用中、已作废、新增时默认使用中
     */
    @Column(name = "BEFORE_STATUS_", length = 32)
    @Schema(description = "变更前状态")
    @Dict(dicCode = "ERP_EQUIPMENT_TAG_STAT")
    private String beforeStatus;

    /**
     * 使用状态：字典值：使用中、已作废、新增时默认使用中
     */
    @Column(name = "AFTER_STATUS_", length = 32)
    @Schema(description = "变更后状态")
    @Dict(dicCode = "ERP_EQUIPMENT_TAG_STAT")
    private String afterStatus;

    @Column(name = "CHANGE_REASON_")
    @Schema(description = "变更原因")
    private String changeReason;

    @Column(name = "REMARK_")
    @Schema(description = "备注")
    private String remark;

}
